{extend name="base" /}

{block name="body"}

<section class="content-header">
  <h1>
    资讯分类列表
    <small>资讯 管理</small>
  </h1>
  <ol class="breadcrumb">
    <li><a href="{:url('admin/index/index')}"><i class="fa fa-dashboard"></i> Home</a></li>
    <li class="active">资讯列表</li>
  </ol>
</section>

<section class="content">
 <!-- 筛选框 -->
  <div class="box box-info">
    
    <div class="box-header with-border">
      <h3 class="box-title">筛选</h3>
    </div>

     <form class="form-horizontal" id="search-form">
      <div class="box-body">

       <div class="form-group">
          <label for="inputEmail3" class="col-sm-1 control-label">资讯分类</label>
          <div class="col-sm-2">
            <select class="form-control select2" name="cate_id" >
            <option value="0">全部</option>}
              {volist name="cateinfo" id="v"}
                <option {$cate_id == $v.id? 'selected' : ''} value="{$v.id}">{$v.level ? "|" : ""} {:str_repeat("——", $v.level)} {$v.cate_name}</option>
              {/volist}
            </select>
          </div>

          <label for="inputEmail3" class="col-sm-1 control-label">是否上架</label>
          <div class="col-sm-2">
            <select class="form-control select2" name="is_on" >
              <option value="">全部</option>
              <option value="1" {$is_on == 1? 'selected' : ''}>上架</option>
              <option value="0" {$is_on == 2? 'selected' : ''}>下架</option>
            </select>
          </div>

           <label for="inputEmail3" class="col-sm-1 control-label">状态</label>
          <div class="col-sm-2">
            <select class="form-control select2" name="is_examine" >
              <option value="">全部</option>
              <option value="1" {$is_examine == 1? 'selected' : ''}>已审核</option>
              <option value="0" {$is_examine == 2? 'selected' : ''}>审核中</option>
            </select>
          </div>
        </div>

          <div class="form-group"> 
           <label for="inputEmail3" class="col-sm-1 control-label">添加时间</label>
          
            <div class="col-sm-3">
             <input type="text" name="start" value="{$start}" class="form-control pull-right datepicker-style" placeholder="开始时间">
            </div>
            

            <div class="col-sm-3">
               <input type="text" name="stop" value="{$stop}" class="form-control pull-right datepicker-style" placeholder="结束时间">
            </div>
           
          
        
       </div>

       <div class="form-group">
          <label for="input3" class="col-sm-1 control-label">资讯标题</label>
          <div class="col-sm-5">
            <input type="text" name="new_title" value="{$new_title}" class="form-control" id="input3" placeholder="请输入资讯标题">
          </div>

           <label for="input3" class="col-sm-1 control-label">作者</label>
          <div class="col-sm-5">
            <input type="text" name="author" value="{$author}" class="form-control" id="input3" placeholder="请输入资讯作者">
          </div>
        </div>
           
        <div class="form-group">
           <label for="inputEmail3" class="col-sm-1 control-label">来源</label>
          <div class="col-sm-2">
            <select class="form-control select2" name="source" >
              <option value="原创" {$source == '原创'? 'selected' : ''}>原创</option>
              <option value="完全转载" {$source == '完全转载'? 'selected' : ''}>完全转载</option>
              <option value="修改后转载" {$source == '修改后转载'? 'selected' : ''}>修改后转载</option>
            </select>
          </div>

           <label for="input3" class="col-sm-1 control-label">排序值</label>
          <div class="col-sm-2">
           <input type="text" name="sort_num" value="{$sort_num}" class="form-control" id="input3">
          </div>
        </div>
        </div>
       

     
   


       <div class="box-footer">
        <div class="row">
          <div class="col-md-1 col-md-offset-10">
            <button type="reset" class="btn btn-default btn-reset">重置</button>
          </div>
          <div class="">
            <button type="submit" class="btn btn-info">搜索</button>
          </div>
        </div>
      </div>

      
    </form>

  </div>    



      
<!-- 列表 -->
  <div class="row">
    <div class="col-xs-12">

      <div class="box">

        <div class="box-header">
        {if condition="show_auth('admin/AdminUser/add')"}
          <a href="javascript:;" data-url="{:url('add')}" proc-url="{:url('addProc')}" title="添加资讯" class="btn btn-success btn-social-icon add-btn"><i class="fa fa-plus-square"></i></a>
        {/if}

        {if condition="show_auth('admin/AdminUser/batchProc')"}

          {if condition="show_auth('admin/AdminUser/delete')"}
            <a href="javascript:;" title="批量删除" class="btn btn-success btn-social-icon batch-btn" data-title="删除" data-type="enable" data-url="{:url('batchProc')}"><i class="fa fa-send"></i></a>

          {/if}
        {/if}

          <a href="javascript:location=location" title="刷新" class="btn btn-default btn-social-icon"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></a>
          <b style="color:#444">&nbsp;&nbsp;&nbsp;资讯总数：{$info->total()}</b>
        </div>

        <div class="box-body table-responsive no-padding">
          <table class="table table-hover">
            <tr>
               <th width="3%">
                <input type="checkbox" id="checkbox-1" class="select_all">
              </th>
              <th width="4%">ID</th>
              <th>资讯标题</th>
              <th>缩略图</th>
              <th>分类ID</th>
              <th>来源</th>
              <th>作者</th>
              <th>更新时间</th>
              <th>审核状态</th>
              <th>是否上架</th>
              <th>排序值</th>    
              <th>操作</th>
            </tr>
            {volist name="info" id="v"}
             <tr class="vertical-c">
              <td class="text-c" width="3%"><input type="checkbox" name="release_id[]" class="ic-checkbox index-chkbox" value="{$v.id}" /></td>
              <td>{$v.id}</td>
              <td>{$v.new_title}</td>
              <td class="image-td">
                <!-- 图标 -->
                <img src={$v.logo|show_image="article",###} alt="..." class="img-thumbnail" width="60" height="60">
                <!-- 隐藏的文件上传框 -->
                <input type="file" data-id={$v.id} data-url="{:url('/admin/article/uploadLogo')}" id="uploadLogo{$v.id}" class="uploda-image" name="logo" value="" style="display:none;"/>
              </td>
              <td>{$v.cate_id}</td>
              <td>{$v.source}</td>
              <td>{$v.author}</td>
              <td>{$v.addtime}</td>
              <td>{$v.is_examine}</td>
              <td>{$v.is_on}</td>
              <td>{$v.sort_num}</td>
              <td>


                {if condition="show_auth('admin/AdminUser/edit')"}
                  <a href="javascript:;" title="编辑" data-id="{$v.id}" data-url="{:url('edit')}" proc-url="{:url('editProc')}" class="btn btn-xs btn-info btn-social-icon edit-btn"><i class="fa fa-pencil"></i></a>
                {/if}

                {if condition="show_auth('admin/AdminUser/delete')"}
                  <a href="javascript:;" title="删除" data-id="{$v.id}" data-url="{:url('delete')}" class="btn btn-xs btn-danger btn-social-icon delete-btn"><i class="fa fa-trash-o"></i></a>
                {/if}
              </td>
            </tr>
            {/volist}
          </table>
        </div>
        
          <div class="box-footer clearfix">
            {$info->render()}
        </div>

      </div>

    </div>
  </div>


</section>

{/block}

{block name="script"}
<script type="text/javascript" src="__AJS__/article/index.js"></script>      

     




{/block}